Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Wallet Addition) Add Galaxy Station wallet #3395

Closed

Conversation

echel0n-HX
Copy link

What is the purpose of the change:

Include Galaxy Station Cosmos-Kit wallet

Copy link

vercel bot commented Jun 24, 2024

@echel0n-HX is attempting to deploy a commit to the OsmoLabs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Jun 24, 2024

Warning

Rate limit exceeded

@echel0n-HX has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 51 minutes and 17 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 99ba4ae and e21efe8.

Walkthrough

The recent updates enhance the Cosmos wallet integration by adding support for the Galaxy Station extension. This includes incorporating the galaxyStationExtensionInfo into the CosmosKitWalletList array and introducing a detailed configuration for the Galaxy Station extension within the CosmosWalletRegistry. These configurations customize various aspects like mobile access, logos, lazy installation, and specific URLs for staking and governance, enhancing the wallet's interaction with the Cosmos network.

Changes

Files Change Summary
...generate-cosmos-kit-wallet-list.ts Added galaxyStationExtensionInfo to the CosmosKitWalletList array.
...wallet-registry.ts Introduced a new wallet configuration for galaxy-station-extension with settings like mobileDisabled, logo, etc.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (1)
packages/web/config/wallet-registry.ts (1)

Line range hint 201-201: Optimize the exponential backoff mechanism.

The static analysis tool recommends using the exponentiation operator ** instead of Math.pow for clarity and modern JavaScript practices.

- setTimeout(resolve, Math.pow(2, retryCount) * 100)
+ setTimeout(resolve, (2 ** retryCount) * 100)

@@ -5,6 +5,7 @@ import path from "node:path";
import { cdcwalletExtensionInfo } from "@cosmos-kit/cdcwallet-extension";
import { Wallet as DefaultWallet } from "@cosmos-kit/core";
import { cosmostationExtensionInfo } from "@cosmos-kit/cosmostation-extension";
import { galaxyStationExtensionInfo } from "@cosmos-kit/galaxy-station-extension";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Package @cosmos-kit/galaxy-station-extension is missing

The package @cosmos-kit/galaxy-station-extension is neither listed in package.json nor installed in node_modules. Please ensure that it is added to the dependencies or devDependencies in package.json and installed to avoid runtime errors.

  • Add @cosmos-kit/galaxy-station-extension to package.json.
  • Run npm install or yarn install to install the package.
Analysis chain

New import added for Galaxy Station wallet.

This import is necessary for the addition of the Galaxy Station wallet to the CosmosKitWalletList. Ensure that the package @cosmos-kit/galaxy-station-extension is correctly installed and listed in package.json to avoid runtime errors.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the package '@cosmos-kit/galaxy-station-extension' is installed.

# Test: Search for the package in package.json. Expect: Package should be listed.
cat package.json | jq '.dependencies["@cosmos-kit/galaxy-station-extension"]'

Length of output: 84



Script:

#!/bin/bash
# Description: Verify if the package '@cosmos-kit/galaxy-station-extension' is listed under devDependencies.

# Test: Search for the package in devDependencies in package.json. Expect: Package should be listed.
cat package.json | jq '.devDependencies["@cosmos-kit/galaxy-station-extension"]'

Length of output: 87



Script:

#!/bin/bash
# Description: Verify if the package '@cosmos-kit/galaxy-station-extension' is installed in node_modules.

# Test: Search for the package in node_modules. Expect: Package directory should exist.
if [ -d "node_modules/@cosmos-kit/galaxy-station-extension" ]; then
  echo "Package is installed in node_modules."
else
  echo "Package is not installed in node_modules."
fi

Length of output: 155

Copy link

vercel bot commented Jun 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
osmosis-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2024 0:40am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
osmosis-frontend-dev ⬜️ Ignored (Inspect) Visit Preview Aug 23, 2024 0:40am

@CryptoAssassin1
Copy link
Member

I enough Osmo in my wallet for the tx but wallet is not selecting Osmo and also Osmo is not included in the gas token list.
https://github.com/osmosis-labs/osmosis-frontend/assets/103904125/8e315734-5846-4eea-ad09-775cda85f680

@kamal-sutra
Copy link
Contributor

@echel0n-HX sometimes the networks are disabled and deposit/withdraw doesn't pop up the tx window.
Screencast from 25-06-24 01:10:56 PM IST.webm

@echel0n-HX
Copy link
Author

I just did a Chihuahua -> Osmosis without issue https://www.mintscan.io/osmosis/tx/3B13D46E6AF9F971A0D3F34F3A3E4612787DFDED93C4C916B44CA7F8C7DE3151

As for the Sentinel issue, most likely its just the LCD, I'll find a better more stable one to swap it to.

@CryptoAssassin1
Copy link
Member

@echel0n-HX this is my Osmosis address but as you can see in the video above Osmo is not included in the gas fee token list
osmo1qnqzdknfvr97uswyvr5qcehmlxhja92zq74dz5

@echel0n-HX
Copy link
Author

@CryptoAssassin1 I'm not able to re-produce that issue you are having swapping Atom -> Osmosis, please see below TX of a successful swap, could of it been a disabled network at the time, I noticed the warning triangle at the top.

https://www.mintscan.io/osmosis/tx/30DB56427B0B80B94C0AD02F2AF3F38A6C5EDCF311AC981B551D87449C642058

@echel0n-HX
Copy link
Author

@kamal-sutra I've updated the LCD endpoint for Sentinel and performed a Osmosis -> Sentinel swap
https://www.mintscan.io/osmosis/tx/928A20D3833E3794480A429C84F0C45692E567A5E55D13F112F4A8A4480A192D

@CryptoAssassin1
Copy link
Member

CryptoAssassin1 commented Jun 25, 2024

@echel0n-HX
Copy link
Author

@CryptoAssassin1 what dev env are you testing this from, I'm currently using Win 11 and Edge with Galaxy Station Wallet v1.0.51

@CryptoAssassin1
Copy link
Member

@echel0n-HX im using Ubuntu 22.04.1 LTS and extension version 1.0.51

@echel0n-HX
Copy link
Author

echel0n-HX commented Jun 25, 2024

@CryptoAssassin1 I believe the issue you are having is isolated to Chrome on Linux, I tested on Edge and Chrome on Windows without issues so far, are you able to test on a Windows box ?

@kamal-sutra
Copy link
Contributor

@echel0n-HX

  1. When Max Osmo is selected to swap, it is not deducting gas fee automatically. Need to manually input Max minus gas amount.
  2. When there is 0 Osmo balance, the wallet is not switching to other available whitelisted fee tokens like atom/tia/usdc etc..

@CryptoAssassin1
Copy link
Member

@echel0n-HX i dont think its OS and browser issue.
The issue is related to wallet.

@echel0n-HX
Copy link
Author

@kamal-sutra thanks for that info, I am now able to reproduce @CryptoAssassin1 issue and am working to resolve it.

@echel0n-HX
Copy link
Author

@kamal-sutra I removed the preferNoSetFee sign option, please authorize Vercel and lets see if that resolves the fee issues.

@MaxMillington
Copy link
Collaborator

@CryptoAssassin1 @kamal-sutra deploy authorized

@echel0n-HX
Copy link
Author

echel0n-HX commented Jun 26, 2024

@CryptoAssassin1 @kamal-sutra so after extensive debugging, what I have determined is that osmosis zone app is posting a request to Galaxy Station extension with the wrong denom, its using ibc/0EF15DF2F02480ADE0BB6E85D9EBB5DAEA2836D3860E9F97F9AADE4F57A31AA0, when it should be using uosmo

Its not cosmos-kit issue either, as we have tested on another app that uses cosmos-kit to swap whale -> to osmosis and logged the posted request, the proper denom of uosmo was present.

I should also note that I did try whale -> osmosis as well on the latest osmosis zone preview, same issue with the wrong denom.

Any ideas ?

@MaxMillington
Copy link
Collaborator

@CryptoAssassin1 @kamal-sutra so after extensive debugging, what I have determined is that osmosis zone app is posting a request to Galaxy Station extension with the wrong denom, its using ibc/0EF15DF2F02480ADE0BB6E85D9EBB5DAEA2836D3860E9F97F9AADE4F57A31AA0, when it should be using uosmo

Its not cosmos-kit issue either, as we have tested on another app that uses cosmos-kit to swap whale -> to osmosis and logged the posted request, the proper denom of uosmo was present.

I should also note that I did try whale -> osmosis as well on the latest osmosis zone preview, same issue with the wrong denom.

Any ideas ?

@JoseRFelix perhaps you have some context here?

@echel0n-HX
Copy link
Author

echel0n-HX commented Jun 27, 2024

@kamal-sutra regarding the max amount and gas fee issues due to it, it seems this was brought up before when Terra Station was added and it was determined the issue to be on the side of osmosis app possibly, please see previous thread regarding this #2210 (comment)

@echel0n-HX
Copy link
Author

echel0n-HX commented Jun 27, 2024

what next steps are required to get this moving forward ?

the gas fee denom issue doesn't look like its something on our side that is fixable, and may need to be resolved on osmosis app side, as long as there is osmo in the end-users wallet, tx's go through fine.

@jonator
Copy link
Member

jonator commented Jun 28, 2024

@echel0n-HX does galaxy station accept alternative fee tokens? Our FE suggests alternative tokens to pay fees depending on the user's balance

@echel0n-HX
Copy link
Author

@jonator based on the gas fee denom passed in via the TX request, and if there is not enough of it to cover the gas, galaxy station will provide the end-user the ability to swap other coins using swap.io to get the required amount of said gas fee denom.

so in the case of the gas denom required being osmo, then osmo needs to be sent as the gas fee denom in the TX request, if there is not enough osmo in the end-users wallet, they will be able to swap other tokens to get more osmo, such as swapping whale -> osmo or chihuahua -> osmo.

the problem right now with trying to swap lunc through swap.io is that there are no routes for it, and its an issue that swap.io is looking into still on their end.

is there a way to have osmosis frontend pass in osmo instead of passing in alternative fee tokens based on balance specifically for galaxy station ? also, this same issue plagues terra station.

@echel0n-HX
Copy link
Author

echel0n-HX commented Jun 28, 2024

@jonator another idea would be to implement a dropdown to allow the end-user to select the gas denom they wish to use for the fee, that will then be passed on in the TX request to the connected wallet, sort that dropdown by balance as well.

You could further combine this with a gas denom allow list that can be set by each wallet profile in wallet-registry.ts, much like you have already for available chains.

@echel0n-HX
Copy link
Author

@jonator I see PR #3423 has been created to address the alt fee issue, this PR should resolve the fee issues we are seeing with Galaxy Station, is there a time frame for when that PR will be merged so we can update our PR as well ?

Thanks!

@jonator
Copy link
Member

jonator commented Oct 8, 2024

stale

@jonator jonator closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants